home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: file open ??
- Date: Wed, 03 Apr 96 00:59:25 GMT
- Organization: none
- Message-ID: <828493165snz@genesis.demon.co.uk>
- References: <315FBE62.6E4A@advance.nl>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <315FBE62.6E4A@advance.nl> martin@advance.nl "Martin Bilstra" writes:
-
- >Hello everyone,
- >
- >I'm having the following problem :
- >
- >In a program I'm using some extern variables. After calling an other function
- > those variables are
- >getting there values, after this the function returns back to the main program
- > with the related
- >value. In the main program the extern variables now have a value where I work
- > with, but then I
- >get a problem. After returning from the function, I open a file but then the
- > values belonging to
- >the extern variables are gone (there value is nothing).
-
- You've done somethe badly wrong somewhere since opening a file cannot affect
- your global variables in a well-defined program.
-
- >My own solution was the following :
- >I open the file before I call the function and I close the file after I stored
- > the variables. But
- >I'm not convinced that's the real solution to the problem, because in other
- > programs I do the
- >same and then things are going well.
- >
- >Can someone help me ?
-
- Not without more to go on. There is a bug in your code somewhere but inless
- you actually show us your code it is impossible to tell where.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-